﻿using System.Collections.Generic;

namespace com.binance.client.model.enums
{
	 

	/// <summary>
	/// sys, web, api, app.
	/// </summary>
	public sealed class OrderSource
	{
	  public static readonly OrderSource SYS = new OrderSource("SYS", InnerEnum.SYS, "sys");
	  public static readonly OrderSource WEB = new OrderSource("WEB", InnerEnum.WEB, "web");
	  public static readonly OrderSource API = new OrderSource("API", InnerEnum.API, "api");
	  public static readonly OrderSource APP = new OrderSource("APP", InnerEnum.APP, "app");
	  public static readonly OrderSource FLSYS = new OrderSource("FLSYS", InnerEnum.FLSYS, "fl-sys");
	  public static readonly OrderSource FLMGT = new OrderSource("FLMGT", InnerEnum.FLMGT, "fl-mgt");
	  public static readonly OrderSource SPOTWEB = new OrderSource("SPOTWEB", InnerEnum.SPOTWEB, "spot-web");
	  public static readonly OrderSource SPOTAPI = new OrderSource("SPOTAPI", InnerEnum.SPOTAPI, "spot-api");
	  public static readonly OrderSource SPOTAPP = new OrderSource("SPOTAPP", InnerEnum.SPOTAPP, "spot-app");
	  public static readonly OrderSource MARGINAPI = new OrderSource("MARGINAPI", InnerEnum.MARGINAPI, "margin-api");
	  public static readonly OrderSource MARGINWEB = new OrderSource("MARGINWEB", InnerEnum.MARGINWEB, "margin-web");
	  public static readonly OrderSource MARGINAPP = new OrderSource("MARGINAPP", InnerEnum.MARGINAPP, "margin-app");
	  public static readonly OrderSource SUPERMARGINAPI = new OrderSource("SUPERMARGINAPI", InnerEnum.SUPERMARGINAPI, "super_margin_api");
	  public static readonly OrderSource SUPERMARGINAPP = new OrderSource("SUPERMARGINAPP", InnerEnum.SUPERMARGINAPP, "super_margin_app");
	  public static readonly OrderSource SUPERMARGINWEB = new OrderSource("SUPERMARGINWEB", InnerEnum.SUPERMARGINWEB, "super_margin_web");
	  public static readonly OrderSource SUPERMARGINFLSYS = new OrderSource("SUPERMARGINFLSYS", InnerEnum.SUPERMARGINFLSYS, "super_margin_fl_sys");
	  public static readonly OrderSource SUPERMARGINFLMGT = new OrderSource("SUPERMARGINFLMGT", InnerEnum.SUPERMARGINFLMGT, "super_margin_fl_mgt");

	  private static readonly IList<OrderSource> valueList = new List<OrderSource>();

	  static OrderSource()
	  {
		  valueList.Add(SYS);
		  valueList.Add(WEB);
		  valueList.Add(API);
		  valueList.Add(APP);
		  valueList.Add(FLSYS);
		  valueList.Add(FLMGT);
		  valueList.Add(SPOTWEB);
		  valueList.Add(SPOTAPI);
		  valueList.Add(SPOTAPP);
		  valueList.Add(MARGINAPI);
		  valueList.Add(MARGINWEB);
		  valueList.Add(MARGINAPP);
		  valueList.Add(SUPERMARGINAPI);
		  valueList.Add(SUPERMARGINAPP);
		  valueList.Add(SUPERMARGINWEB);
		  valueList.Add(SUPERMARGINFLSYS);
		  valueList.Add(SUPERMARGINFLMGT);
	  }

	  public enum InnerEnum
	  {
		  SYS,
		  WEB,
		  API,
		  APP,
		  FLSYS,
		  FLMGT,
		  SPOTWEB,
		  SPOTAPI,
		  SPOTAPP,
		  MARGINAPI,
		  MARGINWEB,
		  MARGINAPP,
		  SUPERMARGINAPI,
		  SUPERMARGINAPP,
		  SUPERMARGINWEB,
		  SUPERMARGINFLSYS,
		  SUPERMARGINFLMGT
	  }

	  public readonly InnerEnum innerEnumValue;
	  private readonly string nameValue;
	  private readonly int ordinalValue;
	  private static int nextOrdinal = 0;

	  private readonly string code;

	  internal OrderSource(string name, InnerEnum innerEnum, string code)
	  {
		this.code = code;

		  nameValue = name;
		  ordinalValue = nextOrdinal++;
		  innerEnumValue = innerEnum;
	  }

	  public override string ToString()
	  {
		return code;
	  }

//JAVA TO C# CONVERTER NOTE: Fields cannot have the same name as methods:EnumLookup

		public static IList<OrderSource> values()
		{
			return valueList;
		}

		public int ordinal()
		{
			return ordinalValue;
		}

		public static OrderSource valueOf(string name)
		{
			foreach (OrderSource enumInstance in OrderSource.valueList)
			{
				if (enumInstance.nameValue == name)
				{
					return enumInstance;
				}
			}
			throw new System.ArgumentException(name);
		}
	}

}